<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<script type="text/javascript" src="js/jquery-1.11.3.min.js"></script>
<style type="text/css" media="screen">
	body{
		width: 100%;
		height: 100%;
		overflow:hidden;
	}
 	.index_img{
        width: 100%;
        height: 700px;
        background: url('images/menu-bg-home.png') no-repeat;
        background-size: 100% 100%;
        float: left;
        position: relative;
    }
</style>
<body>
	<div class="index_img"></div>
    <div style="position: absolute;width: 100%;margin:0 auto;height: 500px;text-align: center;line-height: 500px;" id="over_yzm">
11111111111111111
    </div>
</body>
<script type="text/javascript">
$(function(){
    var positionX = 0;
    var positionY = 0;
    $('#over_yzm').mousemove(function(e) {
        var x = e.clientX, y = e.clientY;
        if(positionX === 0 && positionY === 0){
            positionX = x;
            positionY = y;
        }
        if(x > positionX && y < positionY){
            $('.index_img').stop().animate({'left':2,'top':2},'800',"easeOutCubic");
            positionX = x;
            positionY = y;
        }else if(x > positionX && y > positionY){
            $('.index_img').stop().animate({'left':-2,'top':1},'800',"easeOutCubic");
            positionX = x;
            positionY = y;
        }else if(x < positionX && y < positionY){
            $('.index_img').stop().animate({'left':2,'top':1},'800',"easeOutCubic");
            positionX = x;
            positionY = y;
        }else if(x < positionX && y > positionY){
            $('.index_img').stop().animate({'left':-2,'top':1},'800',"easeOutCubic");
            positionX = x;
            positionY = y;
        }

    })

    $.extend($.easing,{
        easeOutBack:function(x,t,b,c,d,s){
            if (s == undefined) s = 1.70158;
            return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
        },
        easeOutCubic: function (x, t, b, c, d) {
            return c * ((t = t / d - 1) * t * t + 1) + b;
        }
    });
})
</script>
</html>